Skip to content

Conversation

caot
Copy link

@caot caot commented Apr 18, 2018

No description provided.

caot added 2 commits August 29, 2017 13:59
added messages.info(request, 'Your session has expired...')
session expired for ajax
@@ -62,7 +64,11 @@ def process_request(self, request):
delta = now - get_last_activity(request.session)
expire_seconds = self.get_expire_seconds(request)
if delta >= timedelta(seconds=expire_seconds):
request._messages._queued_messages = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this for ?

logout(request)
if request.is_ajax():
return defaults.http.HttpResponseForbidden('403 Forbidden: %s' % msg, content_type='text/html')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's that supposed to do

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If session is expired, a ajax call will get the righ feedback information. That's response.responseText will be '403 Forbidden: %s' % msg

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

added isExpired and idleForSeconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants